package com.dingjian.mcp.config;

import com.dingjian.mcp.tool.UsersMcpTool;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class McpConfig {

    @Bean
    public ToolCallbackProvider  toolCallbackProvider(UsersMcpTool usersMcpTool) {
        return MethodToolCallbackProvider.builder().toolObjects(usersMcpTool).build();
    }
}
